﻿<UserControl x:Class="Project.ComplaintPhotos"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:gif="http://wpfanimatedgif.codeplex.com" mc:Ignorable="d" 
             d:DesignHeight="650" d:DesignWidth="900">
    <UserControl.Resources>
        <DataTemplate x:Key="ImageGalleryDataTemplate">
            <Grid>
                <StackPanel>
                    <TextBlock Text="{Binding Name}" HorizontalAlignment="Center"/>
                    <Border BorderBrush="#0072C6" BorderThickness="2"  Width="220" Height="220" Padding="10" Margin="15">
                    <Image Source="{Binding ImagePath}" Stretch="Fill"  HorizontalAlignment="Center">
                        <Image.ToolTip>
                            <StackPanel>
                            <TextBlock Text="Doble click en la imagen para abrirla"></TextBlock>
                            <Image Source="{Binding ImagePath}" Stretch="Fill" HorizontalAlignment="Center" Height="250" ></Image>
                            </StackPanel>
                        </Image.ToolTip>
                    </Image>
                </Border>
                </StackPanel>
            </Grid>
        </DataTemplate>
        <ItemsPanelTemplate x:Key="ImageGalleryItemsPanelTemplate">
            <UniformGrid Columns="4" HorizontalAlignment="Center" VerticalAlignment="Stretch"/>
        </ItemsPanelTemplate>
    </UserControl.Resources>
    <Grid>
        <Grid Height="36" Margin="11,11,56,0" Name="gridTitle"  VerticalAlignment="Top">
            <Border BorderBrush="#5C5C5C" BorderThickness="0,0,0,2">
                <Grid>
                <TextBlock FontSize="24" FontWeight="Normal" Text="Album de Fotos de denuncia" Width="711" HorizontalAlignment="Left" ></TextBlock>
                </Grid>
            </Border>
        </Grid>
        <Grid Margin="0,79,0,0" Height="48" VerticalAlignment="Top">
            <Label Content="Guardar una nueva foto:" Height="19" HorizontalAlignment="Left" Margin="11,13,0,0" Name="lblAddPhotoInfo" VerticalAlignment="Top" />
            <Button ToolTip="Seleccionar nueva foto" Height="33" HorizontalAlignment="Left" Margin="148,7,0,0" Name="btnSaveNew" VerticalAlignment="Top" Width="33" Click="btnSaveNew_Click">
                <StackPanel>
                    <Image Source="Images/Save.gif" Width="25"></Image>
                </StackPanel>
            </Button>
        </Grid>
        <Grid Visibility="Visible" Name="Loader" Margin="0,127,0,0" VerticalAlignment="Top">
            <Image Width="38" Height="38" gif:ImageBehavior.AnimatedSource="Images/WaitLoader.gif"></Image>
            <Label Foreground="Gray" FontStyle="Italic" Content="Espere porfavor, cargando imagenes..." Height="18" HorizontalAlignment="Left" Margin="229,10,0,0" Name="label2" VerticalAlignment="Top" />
        </Grid>
        <Grid Name="listGrid" Margin="25,165,25,25">
            <ListView x:Name="LsImageGallery"  ItemsSource="{Binding}" ItemTemplate="{DynamicResource ImageGalleryDataTemplate}" ItemsPanel="{DynamicResource ImageGalleryItemsPanelTemplate}" Background="White" MouseDoubleClick="LsImageGallery_OnMouseDoubleClick">
            </ListView>
            <Label Margin="30,30,30,300" FontSize="14" Name="lblMessage" FontFamily="Segoe UI" FontWeight="Light" FontStyle="Italic" Content="No hay ninguna foto cargada para esta denuncia" Visibility="Collapsed" />
        </Grid>
        <Label Content="Numero de Caso:" FontSize="20" FontWeight="Normal" Height="28" HorizontalAlignment="Left" Margin="11,51,0,0" Name="label28" VerticalAlignment="Top" />
        <Label Content="" FontSize="32" FontWeight="Light" Height="45" HorizontalAlignment="Left" Margin="169,42,0,0" Name="lblCaseNumber" VerticalAlignment="Top" />
        <Label Content="Fecha de Registro:" FontSize="20" FontWeight="Normal" Height="28" HorizontalAlignment="Left" Margin="335,52,0,0" Name="label39" VerticalAlignment="Top" />
        <Label Content="11/11/2011" FontSize="18" FontWeight="Normal" Height="28" HorizontalAlignment="Left" Margin="501,56,0,0" Name="lblRegistrationDate" VerticalAlignment="Top" />
    </Grid>
</UserControl>
